[{if $smarty.session.access == 5}]
<table id="usersTable" class="sortable">
  <thead>
    <tr>
      <th>Username</th>
      <th>Access Level</th>
    </tr>
  </thead>
  <tbody>
    [{foreach from=$users item=user key=id name=userlist}]
    <tr>
      <td><a href="?a=edit-user&id=[{$user.userID}]&name=[{$user.username}]">[{$user.username}]</a></td>
      <td>[{$user.access}]</td>
    </tr>
    [{/foreach}]
  </tbody>
</table>
[{if $username != ''}]
<br /><hr /><br />
<form action="?a=edited" method="POST" enctype="multipart/form-data">
  <input type="hidden" name="userid" value="[{$userid}]">
  <input type="hidden" name="user" value="[{$username}]">
  <table>
    <tbody>
      <tr>
        <td>Access Level</td>
        <td><select name="action">
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">Admin</option>
            <option value="0">-DELETE-</option>
        </select></td>
      </tr>
      <tr>
      <td colspan="2" align="center"><input type="submit" value="Submit" /></td>
      </tr>
    </tbody>
  </table>
</form>
[{/if}]
[{literal}]<script language="javascript" type="text/javascript">
  var jobTableFilters = {
    col_0: "select",
    sort_select: true,
    btn: false,
    loader: true,
    loader_text: "Filtering data...",
    loader_html: '<img src="./images/loader.gif" alt="" ' +
      'style="vertical-align:middle;" /><h3>Loading...</h3>',
    display_all_text: "< Show all >"
  }
  setFilterGrid("usersTable",jobTableFilters);
</script>[{/literal}]
[{/if}]